import { fromJS } from 'immutable'
import * as actionTypes from './actionTypes'
// 设置默认值
const defaultValue = fromJS({
  detailContent: []
})

const reducer = (state = defaultValue, action) => {
  switch (action.type) {
    case actionTypes.INIT_DETAILS_CONTENT:
      console.log(action)
      return state.merge({
        detailContent: fromJS(action.data)
      })
    default:
      break;
  }

  return state
}

export default reducer